Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update swagger docs with declaration endpoints #1504

Merged

Conversation

padv2010
Copy link
Contributor

@padv2010 padv2010 commented Jul 3, 2024

Context

Ticket: https://dfedigital.atlassian.net/browse/CPDLP-3103

Description

Add API docs for all the declaration endpoints in NPQ in v1/v2/v3 for the GET/POST participant-declarations in all versions including any errors as in About the API - Manage training for early career teachers . Add the PUT void declarations in all versions.

@padv2010 padv2010 force-pushed the CPDLP-3103-ts-7-update-swagger-docs-with-declaration-endpoints branch from 0c458ac to f923fad Compare July 3, 2024 12:24
@padv2010 padv2010 marked this pull request as ready for review July 3, 2024 12:24
@padv2010 padv2010 requested a review from a team as a code owner July 3, 2024 12:24
@padv2010 padv2010 changed the title Cpdlp 3103 ts 7 update swagger docs with declaration endpoints Update swagger docs with declaration endpoints Jul 3, 2024
@leandroalemao leandroalemao force-pushed the CPDLP-3094 branch 2 times, most recently from 5aa4ff6 to c871d86 Compare July 4, 2024 18:32
Base automatically changed from CPDLP-3094 to main July 4, 2024 19:01
@padv2010 padv2010 force-pushed the CPDLP-3103-ts-7-update-swagger-docs-with-declaration-endpoints branch 3 times, most recently from 9b01e9e to f5275af Compare July 5, 2024 12:59
Copy link

github-actions bot commented Jul 5, 2024

Copy link
Contributor

@leandroalemao leandroalemao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed a very small thing and approved 👍 😄 tks guys

it_behaves_like "an API update endpoint documentation",
"/api/v1/participant-declarations/{id}/void",
"Participant declarations",
"Void a declaration",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could voided declarations have examples returned with voided state?

}
h[:v3][:properties][:attributes][:properties][:lead_provider_name] = {
description: "The name of the provider that submitted the declaration",
type: "string",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add an example to lead provider as it's coming up as string

description: "The type of course the participant is enrolled in",
type: :string,
required: true,
enum: %w[
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we use Course::IDENTIFIERS and Course::IDENTIFIERS.first here similar to declarations?

description: "The type of course the participant is enrolled in",
type: :string,
required: true,
enum: %w[
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here and in the completed declaration request?

Copy link
Collaborator

@cwrw cwrw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good some more suggestions, also could we ensure that the example is valid, so we don't set the has_passed to true if the declaration is started or retained?

@mooktakim mooktakim force-pushed the CPDLP-3103-ts-7-update-swagger-docs-with-declaration-endpoints branch from ef37705 to 82b3792 Compare July 9, 2024 16:28
Copy link
Collaborator

@cwrw cwrw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌 thanks Mook

@mooktakim mooktakim added this pull request to the merge queue Jul 10, 2024
Merged via the queue into main with commit fc4112a Jul 10, 2024
12 checks passed
@mooktakim mooktakim deleted the CPDLP-3103-ts-7-update-swagger-docs-with-declaration-endpoints branch July 10, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants